﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using XMK.Framework.Model;

namespace XMK.Framework.Web
{
    /// <summary>
    /// 安全认证HttpHandler的父类
    /// </summary>
    public abstract class BaseHandler : BaseHandler<object>
    {
        /// <summary>
        /// 返回类型为Object类型的，并调用子类的具体实现
        /// </summary>
        /// <param name="responseInfo">返回至前台结果</param>
        protected override void ProcRequest(ref ResponseInfo<object> responseInfo)
        {
            ResponseInfo obj = new ResponseInfo();
            obj.Data = responseInfo.Data;
            obj.State = responseInfo.State;
            obj.Page = responseInfo.Page;
            obj.ErrMsg = responseInfo.ErrMsg;
            ProcRequest(ref obj);
            responseInfo = obj;
        }
        #region 子类需实现方法
        /// <summary>
        /// 具体处理类
        /// </summary>
        /// <param name="responseInfo">返回至前台结果</param>
        protected abstract void ProcRequest(ref ResponseInfo responseInfo);
        #endregion
    }
}
